Favicon

You are here: Home > API Reference > UEM > Smart Attributes > Retrieve a smart attribute by its ID

Retrieve a smart attribute by its ID

Required Permission: mdm.global.smartAttribute.get

Returns the details of a specific smart attribute using its ID as search parameter

GET
https://api.applivery.io/v1/organizations/{organizationId}/smart-attributes/{smartAttributeId}
curl -X GET "https://api.applivery.io/v1/organizations/{organizationId}/smart-attributes/{smartAttributeId}" \
  -H "Authorization: Bearer <YOUR_API_KEY>"
const response = await fetch("https://api.applivery.io/v1/organizations/{organizationId}/smart-attributes/{smartAttributeId}", {
  method: "GET",
  headers: {
    Authorization: "Bearer <YOUR_API_KEY>",
  },
});

const data = await response.json();
import requests

response = requests.get(
    "https://api.applivery.io/v1/organizations/{organizationId}/smart-attributes/{smartAttributeId}",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
)

data = response.json()

Request

Send your API key in the request header authorization
Example: Authorization: Bearer <token>

organizationId string
required
Match pattern: ^(([a-fA-F0-9]{24})|([a-zA-Z0-9\\-]{3,}))$
smartAttributeId string
required
Match pattern: ^[a-fA-F0-9]{24}$

Responses

200 Response application/json
status boolean required
data object required
id string required
Match pattern: ^[a-fA-F0-9]{24}$
organizationId string required
Match pattern: ^[a-fA-F0-9]{24}$
segmentId number optional
exposeToChildren any optional
name string required
≤ 256 characters
description string optional
≤ 500 characters
output object required
type string required
string number boolean date
input object required
type string required
script
value object required
source string required
device
field object optional
loopTime number required
createdAt string required
updatedAt string required
version number optional
counts object optional
android object required
apple object required
windows object required
{
    "status": true,
    "data": {
        "id": "string",
        "organizationId": "string",
        "segmentId": 0,
        "exposeToChildren": true,
        "name": "string",
        "description": "string",
        "output": {
            "type": "string"
        },
        "input": {
            "type": "constant",
            "value": {
                "admDevice": {
                    "value": "string"
                },
                "aosDevice": {
                    "value": "string"
                },
                "emmDevice": {
                    "value": "string"
                },
                "winDevice": {
                    "value": "string"
                }
            },
            "source": "constant"
        },
        "createdAt": "string",
        "updatedAt": "string",
        "version": 0,
        "counts": {
            "android": {
                "smartAttributeAssignments": 0,
                "smartAttributeAssignmentsEnforced": 0
            },
            "apple": {
                "smartAttributeAssignments": 0,
                "smartAttributeAssignmentsEnforced": 0
            },
            "windows": {
                "smartAttributeAssignments": 0,
                "smartAttributeAssignmentsEnforced": 0
            }
        }
    }
}
401 Response application/json
status boolean optional
false
error object optional
code number optional
4004
message string optional
Invalid Token
{
    "status": false,
    "error": {
        "code": 4002,
        "message": "No auth token"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}